{extend name="admin@public/base_content" /}
{block name="body">}
<body>
{include file="admin@public/common" /}
<div class="layui-form">
    <table class="layui-table lay-even">
        <thead>
        <tr>
            <th width="80">ID</th>
            <th>用户名</th>
            <th>用户组</th>
            <th>状态</th>
            <th width="240">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="list" item="vo"}
        <tr>
            <td>{$vo.user_id}</td>
            <td>{$vo.username}</td>
            <td>{$vo.group_name}</td>
            <td><input type="checkbox" name="field_value" lay-skin="switch" value="1" lay-text="正常|禁用" {eq name="vo.status" value="1"}checked{/eq}  lay-filter="ajax" data-params='{"url":"{:url("api/api/upField")}","confirm":"true","data":"table=admin_user&id_name=user_id&id_value={$vo.user_id}&field=status","complete":"up"}'></td>
            <td>
                <a href="{:url('info',array('user_id'=>$vo['user_id']))}" class="layui-btn layui-btn-mini modal-catch">
                    <i class="iconfont">&#xe653;</i>编辑
                </a>
                <a class="layui-btn layui-btn-mini layui-btn-danger ajax"
                   data-list='{"key":"id={$vo.user_id}","msg":true,"render":"true","action":"del"}'
                   data-params='{"url": "{:url("del")}","confirm":"true","data":"id={$vo.user_id}","complete":"del"}'>
                    <i class="iconfont">&#xe626;</i>删除
                </a>

            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
</div>
<div class="text-right">
    <div class="layui-box layui-laypage layui-laypage-molv" id="layui-laypage-1">
        {$_page}
    </div>
</div>
</body>
{/block}
{block name="script"}
<script>
    layui.use('default');
</script>
{/block}